From: Ray Strode Date: Fri, 2 Aug 2013 18:10:16 +0000 (-0400) Subject: authPrompt: fix disable-user-list / Not Listed? X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3820 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a70e74e478b4413b53b65490e72370d0e26de2d7;p=gnome-shell.git authPrompt: fix disable-user-list / Not Listed? If the first question asked to a user is from the shell and not from the PAM service (i.e. Username: ), then we'll save what the user types until PAM asks a question and then try to send it to PAM. This commit makes sure the preemptive answer can be used before the PAM conversation gets started, and makes sure to discard the preemptive answer if we're not expecting it. https://bugzilla.gnome.org/show_bug.cgi?id=705370 --- diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 7bda7b5ac..07a92b771 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -190,7 +190,8 @@ const AuthPrompt = new Lang.Class({ _onAskQuestion: function(verifier, serviceName, question, passwordChar) { if (this._preemptiveAnswer) { - this._userVerifier.answerQuery(this._queryingService, this._preemptiveAnswer); + if (this._queryingService) + this._userVerifier.answerQuery(this._queryingService, this._preemptiveAnswer); this._preemptiveAnswer = null; return; } @@ -341,7 +342,14 @@ const AuthPrompt = new Lang.Class({ }, getAnswer: function() { - let text = this._entry.get_text(); + let text; + + if (this._preemptiveAnswer) { + text = this._preemptiveAnswer; + this._preemptiveAnswer = null; + } else { + text = this._entry.get_text(); + } return text; },